package src;

import javax.swing.*;
import java.awt.*;

//import static java.awt.GridBagConstraints.NORTH;

/**
 * Created by dell on 2017/8/2.
 */
public class GridLayoutTest {
    public static void main(String[] args) {
        JFrame f=new JFrame("计算器");
        Panel p1=new Panel();
        p1.add(new TextField(30));
        //p.setLayout(new BorderLayout(30,5));
        f.add(p1 , 0);
//        Panel p1=new Panel();
//        p1.setLayout(new GridLayout(3,5,4,4));
//        String[] name={"0","1","2","3","4","5","6","7","8","9","+","-","*","/","."};
//        for(int i=0;i<name.length;i++){
//            p1.add(new Button(name[i]));
//        }
//        f.add(p1);
        f.pack();
        f.setVisible(true);
    }
}
